/*
 * Copyright 2012 Focus Technology, Co., Ltd. All rights reserved.
 */
package com.coderonrails.cdistr.slave.comint;

import java.net.Socket;

/**
 * Test.java
 * 
 * @author chenjianguo
 */
public class Test {
    public static void main(String[] args) {
        try {
            Socket socket = new Socket("192.168.21.24", 4321);
            socket.getOutputStream().write("utf-8##192.168.21.24##123321##Hello6".getBytes());
            socket.close();

            while (true) {
                Socket socket_1 = new Socket("192.168.21.24", 4323);
                socket_1.getOutputStream().write("192.168.21.24##123321".getBytes());
                socket_1.close();
                Thread.currentThread().sleep(5000);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }
}
